# 导入模块
import numpy as np
# 创建数组
arr = np.array([23, 12, 1, 3, 4, 5, 6])
# k的值
k = 3
# 使用np.argpartition()
result = np.argpartition(arr, k)
# k个最小值的索引
print(arr[result[:k]])
print(result[:k])